<?xml version="1.0" encoding="UTF-8"?>
<!--
  Created by IntelliJ IDEA.
  User: imon
  Date: 2/18/13
  Time: 9:06 PM
-->

<ui:composition template="/templates/layout.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="#{var['layout.title']}">
        <title>#{msg['myContribution.title']}</title>
    </ui:define>

    <ui:define name="#{var['layout.content']}">
        <ui:include src="templates/user_menu.xhtml"/>

        <div>
            <c:choose>
                <c:when test="#{not empty myContributionController.getUserDonationList()}">
                    <p:dataTable var="donationList" value="#{myContributionController.getUserDonationList()}">
                        <p:column headerText="#{msg['myContribution.headerText.issueTitle']}">
                            <h:outputText value="#{donationList.issueTitle}"/>
                        </p:column>

                        <p:column headerText="#{msg['myContribution.headerText.amount']}">
                            <h:outputText value="#{donationList.amount}"/>
                        </p:column>

                        <p:column headerText="#{msg['myContribution.headerText.date']}">
                            <h:outputText value="#{donationList.donationDate}"/>
                        </p:column>
                    </p:dataTable>
                </c:when>
                <c:otherwise>
                    <br/>
                    <p:outputLabel value="No Records Found"></p:outputLabel>
                </c:otherwise>
            </c:choose>
        </div>
    </ui:define>


</ui:composition>